package com.egg.auth.entity.user;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.egg.common.core.model.entity.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.time.LocalDateTime;

/**
 * <p>
 * 用户表
 * </p>
 *
 * @author east
 * @since 2021-07-16
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName(value = "auth_user")
@ApiModel(value = "User对象", description = "用户表")
public class User extends BaseEntity {


    @ApiModelProperty(value = "姓名")
    @TableField(value = "real_name")
    private String realName;

    @ApiModelProperty(value = "昵称")
    @TableField(value = "nickname")
    private String nickname;

    @ApiModelProperty(value = "头像")
    @TableField(value = "avatar")
    private String avatar;

    @ApiModelProperty(value = "手机")
    @TableField(value = "phone")
    private String phone;

    @ApiModelProperty(value = "邮箱")
    @TableField(value = "email")
    private String email;

    @ApiModelProperty(value = "状态", notes = "com.egg.auth.enums.user.UserStateEnum")
    @TableField(value = "state")
    private String state;

    @ApiModelProperty(value = "性别", notes = "com.egg.auth.enums.user.UserGenderEnum")
    @TableField(value = "gender")
    private String gender;

    @ApiModelProperty(value = "在线")
    @TableField(value = "online_state")
    private Boolean onlineState;

    @ApiModelProperty(value = "最后登录时间")
    @TableField(value = "last_login_date")
    private LocalDateTime lastLoginDate;


}
